﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Evan.BusinessException
{
    /// <summary>
    /// 自定义异常示例
    /// </summary>
    public class BusinessException : ApplicationException
    {
        private string errorCode;

        public BusinessException(Enum code, string message) : base(message)
        {
            errorCode = EnumHelper.GetAttributeDescription(code);
        }
        public string GetErrorCode()
        {
            return errorCode;
        }
    }

}
